package edu.umd.ion.wavemeter.client;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.event.dom.client.KeyPressHandler;


public class Keyboard implements KeyPressHandler {
	private ClickHandler Handler;
	
	public Keyboard(ClickHandler handler) {
		Handler = handler;
	}
	
	public void onKeyPress(KeyPressEvent e) {
		if (e.getCharCode()==(char) KeyCodes.KEY_ENTER) {
			Handler.onClick(null);
		}			
	}
}